<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8" />
<head>
<title>供应商管理 <?php echo $this->config->item('title');?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?php echo base_url()?>public/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url()?>public/css/style.css">

</head>
<body>
	<script src="<?php echo base_url()?>public/js/jquery-2.0.2.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap.min.js"></script>
	<script src="<?php echo base_url()?>public/js/bootstrap-confirm.js"></script>
	<script src="<?php echo base_url()?>public/js/ssi_common.js"></script>
	<div role="navigation" class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand">SSI后台管理系统</a>
			</div>
			<div class="collapse navbar-collapse navbar-right">
				<ul class="nav navbar-nav">
					<li><a href="<?php echo base_url()?>" class="navbar-link">首页</a></li>
					<li><a href="<?php echo base_url()."index.php/common_login_user_set"?>" class="navbar-link">超级管理员</a></li>
					<li><a href="<?php echo base_url()?>index.php/common_login_manage/logout" class="navbar-link">退出</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="col-xs-3">
				<?php echo $user_menu?>
			</div>
			<div class="col-sm-9">
				<div class="panel panel-default">
					<div class="panel-heading">
						<p>
							&nbsp;<a href="<?php echo base_url()."index.php/common_role_manage/to_add_role"?>"
								class="btn btn-link pull-right"><span
								class="glyphicon glyphicon-plus"> </span><span> 添加</span> </a>
						</p>
					</div>
					<div class="panel-body">
					<?php if ($query_role) {?>
						<table class="table table-hover">
							<thead>
								<tr>
									<td class="col-md-2"><b>角色名称</b></td>
									<td class="col-md-5"><b>角色说明</b></td>
									<td class="col-md-2"><b>操作</b></td>
								</tr>
							</thead>
							<tbody>
								<?php if ($role_list!=null) {
									foreach ($role_list as $role){
								?>
								<tr>
									<td><?php echo $role['role_name']?></td>
									<td ><?php echo $role['description']?>
									</td>
									<td >
										<?php if ($assign_role_right) {?>
										<a title="分配权限" href="<?php echo base_url()."index.php/common_role_manage/to_assign_right"?>?role_id=<?php echo $role['role_id']?>" class="btn btn-link"><span class="glyphicon glyphicon-hand-right"></span></a>
										<?php }?>
										<?php if ($update_role) {?>
										<a title="编辑" href="<?php echo base_url()."index.php/common_role_manage/to_modify_role"?>?role_id=<?php echo $role['role_id']?>" class="btn btn-link"><span class="glyphicon glyphicon-pencil"></span></a>
										<?php }?>
										<?php if ($delete_role) {?>
										<a title="删除" rel="<?php echo base_url()."index.php/common_role_manage/delete_role"?>?role_id=<?php echo $role['role_id']?>" class="btn confirm btn-link"><span class="glyphicon glyphicon-trash"></span></a>
										<?php }?>
									</td>
								</tr>
								<?php }
								}?>
							</tbody>
						</table>
						<?php }?>
					</div>
				</div>
				<ul class="pagination pull-right">
				<?php echo $page_link?>
				</ul>
				
			</div>
		</div>
	</div>
	<script>
	$('.confirm[rel]').each(function() {
	 $(this).confirm({
	  'title' : '是否确认删除',
	  'message' : '该操作无法恢复，请再次确认！',
	  'action' : $(this).attr('rel')
	 });
	});
	</script>
<div  class="back-to" id="toolBackTop">
	<a title="返回顶部" onclick="window.scrollTo(0,0);return false;" href="#top" class="back-top">
	返回顶部</a>
	<a title="返回底部" onclick="window.scrollTo(0,document.body.scrollHeight);return false;" href="#bottom" class="back-bottom">
	返回底部</a>
</div>
</body>
</html>
